package com.wl.network;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class demo01 {
    public static void main(String[] args) {
        try {
            InetAddress name = InetAddress.getByName("192.168.1.4");
            System.out.println(name);
            System.out.println(name.getHostName());
            System.out.println(name.getHostAddress());
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
    }
}
